//package com.sinothk.cloud.mq.kafka;
//
//import lombok.AllArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.kafka.clients.consumer.ConsumerRecord;
//import org.springframework.kafka.annotation.KafkaListener;
//import org.springframework.stereotype.Component;
//
///**
// * @Description //TODO
// * @Date 2020/2/26 17:13
// * @Author GaoX
// */
//@Component
//@AllArgsConstructor
//@Slf4j
//public class KafkaConsumer {
//
//    @KafkaListener(topics = "${kafka.topic}", groupId = "${kafka.group}")
//    public void data(ConsumerRecord consumerRecord) {
//        Object value = consumerRecord.value();
//        if (log.isInfoEnabled()) {
//            log.info("offset {}, value {}", consumerRecord.offset(), consumerRecord.value());
//        }
//        if (null == value) {
//            log.error("kafka消费数据为空");
//        }
//        log.info((String) value);
//    }
//}
